home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Prog / M / LSC213.cpt / WindowMgr.h < prev   
Encoding:
C/C++ Source or Header  |  1987-09-26  |  2.1 KB  |  124 lines  |  [TEXT/KAHL]

  1.  
  2. /*
  3.  *  WindowMgr.h
  4.  *
  5.  *  Copyright (c) 1986, 1987 THINK Technologies, Inc.
  6.  *  These interfaces are based on information copyrighted
  7.  *  by Apple Computer, Inc., 1985, 1986, 1987.
  8.  *
  9.  */
  10.  
  11. #ifndef    _WindowMgr_
  12. #define _WindowMgr_
  13.  
  14. #ifndef    _Quickdraw_    
  15. #include "Quickdraw.h"
  16. #endif
  17.  
  18. /*  window def proc ID's  */
  19. enum {
  20.     documentProc,
  21.     dBoxProc,
  22.     plainDBox,
  23.     altDBoxProc,
  24.     noGrowDocProc,
  25.     rDocProc = 16
  26. };
  27.  
  28. /* types of windows  */
  29. #define    dialogKind    2
  30. #define userKind    8
  31.  
  32. /*  FindWindow values  */
  33. enum {
  34.     inDesk,
  35.     inMenuBar,
  36.     inSysWindow,
  37.     inContent,
  38.     inDrag,
  39.     inGrow,
  40.     inGoAway,
  41.     inZoomIn,
  42.     inZoomOut
  43. };
  44.  
  45. /* Axis constraints for DragGrayRgn */
  46. enum { noConstraint, hAxisOnly, vAxisOnly };
  47.  
  48. /*  window defproc messages  */
  49. enum {
  50.     wDraw,
  51.     wHit,
  52.     wCalcRgns,
  53.     wNew,
  54.     wDispose,
  55.     wGrow,
  56.     wDrawGIcon
  57. };
  58.  
  59. /*  hit test codes  */
  60. enum {
  61.     wNoHit,
  62.     wInContent,
  63.     wInDrag,
  64.     wInGrow,
  65.     wInGoAway,
  66.     wInZoomIn,
  67.     wInZoomOut
  68. };
  69.  
  70. /*  rsrc ID of desktop pattern  */
  71. #define deskPatID    16
  72.  
  73.  
  74. typedef    struct WindowRecord
  75.     {
  76.     GrafPort        port;
  77.     int                windowKind;
  78.     char            visible;
  79.     char            hilited;
  80.     char            goAwayFlag;
  81.     char            spareFlag;
  82.     RgnHandle         strucRgn;
  83.     RgnHandle         contRgn;
  84.     RgnHandle         updateRgn;
  85.     Handle            windowDefProc;
  86.     Handle            dataHandle;
  87.     StringHandle     titleHandle;
  88.     int                titleWidth;
  89.     struct ControlRecord ** controlList;
  90.     struct WindowRecord * nextWindow;
  91.     PicHandle         windowPic;
  92.     long            refCon;
  93.     } WindowRecord, *WindowPeek ;
  94.  
  95. typedef GrafPtr    WindowPtr;
  96.  
  97. typedef struct WStateData {
  98.     Rect            userState;
  99.     Rect            stdState;
  100. } WStateData;
  101.  
  102.  
  103. /*  functions returning non-integral values  */
  104. pascal WindowPtr NewWindow();
  105. pascal WindowPtr GetNewWindow();
  106. pascal WindowPtr FrontWindow();
  107. pascal PicHandle GetWindowPic();
  108.  
  109. /*  low-memory globals  */
  110. extern WindowPeek WindowList : 0x9D6;
  111. extern int SaveUpdate : 0x9DA;
  112. extern int PaintWhite : 0x9DC;
  113. extern GrafPtr WMgrPort : 0x9DE;
  114. extern RgnHandle GrayRgn : 0x9EE;
  115. extern ProcPtr DragHook : 0x9F6;
  116. extern Pattern DragPattern : 0xA34;
  117. extern Pattern DeskPattern : 0xA3C;
  118. extern WindowPtr CurActivate : 0xA64;
  119. extern WindowPtr CurDeactive : 0xA68;
  120. extern ProcPtr DeskHook : 0xA6C;
  121. extern WindowPtr GhostWindow : 0xA84;
  122.  
  123.  
  124. #endif _WindowMgr_